﻿using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using System;

namespace DB
{
    public class MyContext : Microsoft.EntityFrameworkCore.DbContext
    //Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext
    {
        public MyContext(DbContextOptions<MyContext> options)
            : base(options)
        {

        }

        /// <summary>
        /// 视频播放记录
        /// </summary>
        public DbSet<Model.VideoLog> VideoLogs { get; set; }
        
        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            // Customize the ASP.NET Identity model and override the defaults if needed.
            // For example, you can rename the ASP.NET Identity table names and more.
            // Add your customizations after calling base.OnModelCreating(builder);

            //builder.Entity<IdentityUser<string>>().ToTable("FsUser");
            //builder.Entity<IdentityRole<string>>().ToTable("FsRole");

            //builder.Entity<IdentityUserClaim<string>>().ToTable("FsUserClaim");
            //builder.Entity<IdentityUserLogin<string>>().ToTable("FsUserLogin");
            //builder.Entity<IdentityUserRole<string>>().ToTable("FsUserRole");
            //builder.Entity<IdentityUserToken<string>>().ToTable("FsUserToken");
            //builder.Entity<IdentityRoleClaim<string>>().ToTable("FsRoleClaim");
        }

    }
}
